package com.kfm.base.thread.day04;

public class Demo {

    public static void main(String[] args) {
        ThreadLocal<Integer> threadLocal = new ThreadLocal<>();
        threadLocal.set(6);

        InheritableThreadLocal<Integer> inheritableThreadLocal = new InheritableThreadLocal<>();
        inheritableThreadLocal.set(7);



        Thread thread = new Thread(() -> {
            System.out.println("threadLocal : " + threadLocal.get());
            System.out.println("inheritableThreadLocal : " + inheritableThreadLocal.get());
        });


        thread.start();
    }
}
